package whf.survey.entity;

import whf.framework.security.entity.User;

/**
 * @author wanghaifeng
 * @create Sep 12, 2006 10:14:48 PM
 * 
 */
public class SurveyAnswer extends whf.framework.entity.AbstractEntity {

	private static final long serialVersionUID = 0;

	private whf.survey.entity.Survey survey;

	private whf.survey.entity.SurveyTopic topic;

	private whf.framework.security.entity.User user;

	private SurveyTopicChoice choice;
	
	private String answer;

	// ---------- methods ----------
	public SurveyAnswer(){
		super();
	}
	
	public SurveyAnswer(Survey survey, SurveyTopic topic, User user, SurveyTopicChoice choice){
		this.survey = survey;
		this.topic = topic;
		this.user = user;
		this.choice = choice;
	}
	
	public SurveyAnswer(Survey survey, SurveyTopic topic, User user, String answer){
		this.survey = survey;
		this.topic = topic;
		this.user = user;
		this.answer = answer;
	}
	
	public void setSurvey(whf.survey.entity.Survey survey) {
		this.survey = survey;
	}

	public whf.survey.entity.Survey getSurvey() {
		return this.survey;
	}

	public void setTopic(whf.survey.entity.SurveyTopic topic) {
		this.topic = topic;
	}

	public whf.survey.entity.SurveyTopic getTopic() {
		return this.topic;
	}

	public void setUser(whf.framework.security.entity.User user) {
		this.user = user;
	}

	public whf.framework.security.entity.User getUser() {
		return this.user;
	}

	public void setAnswer(String answer) {
		this.answer = answer;
	}

	public String getAnswer() {
		return this.answer;
	}

	/**
	 * @return Returns the choice.
	 */
	public SurveyTopicChoice getChoice() {
		return choice;
	}

	/**
	 * @param choice The choice to set.
	 */
	public void setChoice(SurveyTopicChoice choice) {
		this.choice = choice;
	}

}